package vaani.internal.applicationmanagers;

import java.util.Vector;
import vaani.internal.ProcessInstance;
import vaani.internal.ProcessInstanceBash;
import vaani.internal.beagle.Result;
import vaani.shabd.ApplicationMiner;

/**
 *
 * @author sourcemorph
 */
public class FileManager extends GenericManagerBashType {

    public FileManager(Vector<String> arguments) {
        super(arguments);
    }
    
    @Override
    protected ProcessInstance createProcessInstance(Result res) {
        String temp = ApplicationMiner.MatchApplication(res.getFileType());
        String proc = temp + " " + res.getURL();
        String desc = "Open the file " + res.getURL() + " in " + temp;
        return new ProcessInstanceBash(proc, desc);
    }
}
